package naga.x.platform2.app.model;

import java.util.Date;

import com.alibaba.fastjson.JSON;

public class Recharge {

	protected int id;
	protected String orderId;
	protected long userId; // 玩家id
	protected String channelUid;
	protected int serverId;
	protected int money; // 单位：元
	protected int stone;
	protected int product;
	protected Date time;
	protected State state;
	protected String channel;
	protected String attach;
	
	public static enum State {
		INIT, SUCC, FAIL
	}
	
	public Recharge() {}
	
	public Recharge(String orderId, long userId, int serverId, int money, int stone, int product, String channel) {
		this.orderId = orderId;
		this.userId = userId;
		this.serverId = serverId;
		this.money = money;
		this.stone = stone;
		this.product = product;
		this.time = new Date();
		this.channel = channel;
		this.state = State.INIT;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}
	
	public String getChannelUid() {
		return channelUid;
	}

	public void setChannelUid(String channelUid) {
		this.channelUid = channelUid;
	}

	public int getServerId() {
		return serverId;
	}

	public void setServerId(int serverId) {
		this.serverId = serverId;
	}

	public int getMoney() {
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}

	public int getStone() {
		return stone;
	}

	public void setStone(int stone) {
		this.stone = stone;
	}

	public int getProduct() {
		return product;
	}

	public void setProduct(int product) {
		this.product = product;
	}

	public Date getTime() {
		return time;
	}

	public void setTime(Date time) {
		this.time = time;
	}

	public State getState() {
		return state;
	}

	public void setState(State state) {
		this.state = state;
	}

	public String getChannel() {
		return channel;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}

	public String getAttach() {
		return attach;
	}

	public void setAttach(String attach) {
		this.attach = attach;
	}

	@Override
	public String toString() {
		return JSON.toJSONString(this);
	}

}
